#ifndef CAMAC_CC32_H
#define CAMAC_CC32_H

#include <stdint.h>
#include "libcc32.h"

class Camac_CC32 {
  
  protected:
    CC32_HANDLE handle;
    int q, x;
    
  public:
    Camac_CC32() : handle(0), q(0), x(0) {};
    Camac_CC32(char *path);
    virtual ~Camac_CC32();
    
    //virtual void Open();
    virtual void Open(char *path);
    virtual void Close();
    
    virtual uint16_t ReadWord(unsigned int n, unsigned int a, unsigned int f);
    virtual void WriteWord(unsigned int n, unsigned int a, unsigned int f, uint16_t data);
      
    virtual uint32_t ReadLong(unsigned int n, unsigned int a, unsigned int f);
    virtual void WriteLong(unsigned int n, unsigned int a, unsigned int f, uint32_t data);
    
  protected:
    virtual void VerifySuccess();
};

#endif
